package com.ReflectDemo;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author leon(liangzou0318@gmail.com)
 * @date 2013-1-1
 * @filaname RunIvocationHander.java
 */
public class RunIvocationHander implements InvocationHandler {
	Movable realclass;
    public RunIvocationHander(Movable realclass) {
		super();
		this.realclass = realclass;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println(System.currentTimeMillis());
		method.invoke(realclass, args);
		System.out.println(System.currentTimeMillis());
		return null;
	}

}
